#include "controlDevice.h"
#include <stdlib.h>
#include <stdio.h>
livingRoomLightOpen(int pinNum)
{
  digitalWrite(pinNum, LOW);
};

livingRoomLightClose(int pinNum)
{
  digitalWrite(pinNum, HIGH);
};
livingRoomLightInit(int pinNum)
{
  pinMode(pinNum, OUTPUT);
  digitalWrite(pinNum, HIGH);
};
livingRoomLightStaus(int staus){

};
struct Devices livingRoomLight = {
    .devicesName = "livingRoomLight",
    .pinNum = 5,
    .open = livingRoomLightOpen,
    .close = livingRoomLightClose,
    .deviceInit = livingRoomLightInit,
    .changeStaus = livingRoomLightStaus

};
struct Devices *addlivingRoomLightToDeviceLink(struct Devices *pthead)
{
  if (pthead == NULL)
  {
    return &livingRoomLight;
  }
  else
  {

    livingRoomLight.next = pthead;
    pthead = &livingRoomLight;
    return pthead;
  }
}
